#!/bin/sh

# PROVIDE: p0f
# REQUIRE: ezjail
# BEFORE:  DAEMON
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable `p0f':
#
# p0f_enable="YES"
# p0f_flags="<set as needed>"
#
# See p0f(1) for p0f_flags
#

. "/etc/rc.subr"

name="p0f"
rcvar="p0f_enable"

command="/usr/local/bin/p0f"
pidfile="/var/run/$name.pid"

# read configuration and set defaults
load_rc_config "$name"
: ${p0f_enable="NO"}
: ${p0f_args="-i bce1 -d -s /tmp/.p0f_socket 'dst port 25 or dst port 587 or dst port 465'"}

command_args="${p0f_args}"

run_rc_command "$1"
